package guoanmaker.operator.business.repository;

import java.util.List;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;

import guoanmaker.operator.business.model.OperatorDepartment;


public interface OperatorDepartmentRepository extends  JpaRepository<OperatorDepartment, String>, JpaSpecificationExecutor<OperatorDepartment> {

	@Query("select d from OperatorDepartment d where d.depname=:depname")	
	public OperatorDepartment findByDepName(@Param("depname") String depname);
	
	@Query("select d from OperatorDepartment d where d.status=:status")	
	public List<OperatorDepartment> findByStauts(@Param("status") int status);
	
	
}
